<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>图集</title>
	<link type='text/css' rel="stylesheet" href='view/css/css.css'/>
	<script type="text/javascript" src='view/js/jquery.js'></script>
	<script type="text/javascript" src='view/js/js.js'></script>
</head>
<body>
	<a href="index.php?a=add">添加图集</a><br>
	<div id="image">
		<span class='left btn'>&lt;</span>
		<span class='right btn'>&gt;</span>
		<div id="list">
			<ul>
				<?php foreach ($imageDb as $img) {
					if (isset($_GET['cid']) && $img['cid']!=$_GET['cid'])continue;
				?>
				<li>
					
					<img src="<?php echo __ROOT__;?>/<?php echo $img['file'];?>"/>
				</li>
				<?php } ?>
			</ul>
		</div>
	</div>
	<div id="category" class="catImg">
		<ul>
			<?php foreach ($categoryDb as $cat) {?>
			<li>
				<a href="index.php?cid=<?php echo $cat['cid'];?>">
				<?php foreach ($imageDb as $img) {
					if($img['cid']==$cat['cid']){
						echo '<img src="'.__ROOT__.'/'.$img["file"].'"/>';
						break;
					}
				} ?>
				<p><?php echo $cat['catname']; ?></p></a>
				<?php } ?>
			</li>
		</ul>
	</div>
</body>
</html>